<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>商品详情</title>
    <link rel="stylesheet" href="../../css/aui.css">
    <link rel="stylesheet" href="../../css/swiper.min.css">
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="../../css/iconfont/iconfont.css">
    <script type="text/javascript" src="../../script/api.js"></script>
    <script language="JavaScript" src="../../script/vue.js"></script>
    <script language="javascript" src="../../script/swiper.min.js"></script>
    <script language="JavaScript" src="../../script/common.js"></script>

</head>

<body>

    <div id="detail-box" v-cloak>

        <header class="aui-bar aui-bar-nav" id="header">
            <a class="aui-pull-left aui-btn" onclick="closewin();">
                <span class="aui-iconfont aui-icon-left"></span>
            </a><span>商品详情</span>
            <a class="aui-pull-right aui-btn" onclick="openshare();">
                <span class="aui-iconfont aui-icon-share"></span>
            </a>
        </header>

    </div>


    </div>
    <script language="javascript">
        var vm = new Vue({
            el: '#detail-box',
            data: {
                product_id: 0,
                orderno:'',
                sharestatus:false,
                pagetype:'productinfo',
            },
            methods: {

                load_init: function() {
                    headerh = $api.dom("header").offsetHeight;
                    $page.openfrm('product_productinfo_frm', './productinfo_frame.html', {
                        x: 0,
                        y: headerh,
                        h: api.winHeight - headerh
                    }, {
                        id: this.product_id,
                        orderno:this.orderno
                    }, false, true);
                }

            }
        }
  );
  function openshare(){
      vm.sharestatus = !vm.sharestatus;
      console.log(vm.sharestatus);
    if(vm.sharestatus){
      $page.openfrm('product_share_frame','./share_frame.html',{x:0,y:0,w:api.winWidth,h:'auto'},{pagetype:vm.pagetype,id:vm.product_id});
    }else{
      api.closeFrame({
          name: 'product_share_frame'
      });
    }
  }
        apiready = function() {
            var pageParam = api.pageParam;
            vm.product_id = pageParam.id;
            if (pageParam.orderno) {
                vm.orderno = pageParam.orderno;
            }

            vm.load_init();

        }
    </script>
</body>


</html>
